{
 "cells": [
  {
   "attachments": {},
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "# [Conduct a Vector Similarity Search](https://milvus.io/docs/v2.3.0-beta/search.md)\n",
    "\n",
    "> This topic describes how to search entities with Milvus.\n",
    "\n",
    "A vector similarity search in Milvus calculates the distance between query vector(s) and vectors in the collection with specified similarity metrics, and returns the most similar results. By specifying a boolean expression that filters the scalar field or the primary key field, you can perform a hybrid search or even a search with Time Travel."
   ]
  },
  {
   "attachments": {},
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "# Connect to milvus"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 1,
   "metadata": {
    "dotnet_interactive": {
     "language": "csharp"
    },
    "polyglot_notebook": {
     "kernelName": "csharp"
    },
    "vscode": {
     "languageId": "polyglot-notebook"
    }
   },
   "outputs": [
    {
     "data": {
      "text/html": [
       "<div><div></div><div></div><div><strong>Installed Packages</strong><ul><li><span>Milvus.Client, 2.2.2-preview.2</span></li></ul></div></div>"
      ]
     },
     "metadata": {},
     "output_type": "display_data"
    },
    {
     "data": {
      "text/html": [
       "<details open=\"open\" class=\"dni-treeview\"><summary><span class=\"dni-code-hint\"><code>{MilvusClient:localhost:19530}</code></span></summary><div><table><thead><tr></tr></thead><tbody><tr><td>Address</td><td><div class=\"dni-plaintext\"><pre>localhost:19530</pre></div></td></tr></tbody></table></div></details><style>\r\n",
       ".dni-code-hint {\r\n",
       "    font-style: italic;\r\n",
       "    overflow: hidden;\r\n",
       "    white-space: nowrap;\r\n",
       "}\r\n",
       ".dni-treeview {\r\n",
       "    white-space: nowrap;\r\n",
       "}\r\n",
       ".dni-treeview td {\r\n",
       "    vertical-align: top;\r\n",
       "    text-align: start;\r\n",
       "}\r\n",
       "details.dni-treeview {\r\n",
       "    padding-left: 1em;\r\n",
       "}\r\n",
       "table td {\r\n",
       "    text-align: start;\r\n",
       "}\r\n",
       "table tr { \r\n",
       "    vertical-align: top; \r\n",
       "    margin: 0em 0px;\r\n",
       "}\r\n",
       "table tr td pre \r\n",
       "{ \r\n",
       "    vertical-align: top !important; \r\n",
       "    margin: 0em 0px !important;\r\n",
       "} \r\n",
       "table th {\r\n",
       "    text-align: start;\r\n",
       "}\r\n",
       "</style>"
      ]
     },
     "metadata": {},
     "output_type": "display_data"
    }
   ],
   "source": [
    "#r \"nuget: Milvus.Client, 2.2.2-preview.2\"\n",
    "#!import config/Settings.cs\n",
    "\n",
    "using Milvus.Client;\n",
    "using InteractiveKernel = Microsoft.DotNet.Interactive.Kernel;\n",
    "\n",
    "//Connect to milvus\n",
    "(string endpoint, int port, string userName, string password) = Settings.LoadFromFile();\n",
    "\n",
    "MilvusClient milvusClient = default;\n",
    "\n",
    "milvusClient = new MilvusClient(endpoint, port, userName, password, null);\n",
    "milvusClient"
   ]
  },
  {
   "attachments": {},
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "# Load collection\n",
    "\n",
    "All search and query operations within Milvus are executed in memory. Load the collection to memory before conducting a vector similarity search."
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 3,
   "metadata": {
    "dotnet_interactive": {
     "language": "csharp"
    },
    "polyglot_notebook": {
     "kernelName": "csharp"
    },
    "vscode": {
     "languageId": "polyglot-notebook"
    }
   },
   "outputs": [
    {
     "data": {
      "text/html": [
       "<details open=\"open\" class=\"dni-treeview\"><summary><span class=\"dni-code-hint\"><code>Milvus.Client.MilvusCollectionDescription</code></span></summary><div><table><thead><tr></tr></thead><tbody><tr><td>Aliases</td><td><div class=\"dni-plaintext\"><pre>[  ]</pre></div></td></tr><tr><td>CollectionName</td><td><div class=\"dni-plaintext\"><pre>book</pre></div></td></tr><tr><td>CollectionId</td><td><div class=\"dni-plaintext\"><pre>443732094175944322</pre></div></td></tr><tr><td>ConsistencyLevel</td><td><span>Session</span></td></tr><tr><td>CreationTimestamp</td><td><div class=\"dni-plaintext\"><pre>1692705169260</pre></div></td></tr><tr><td>Schema</td><td><details class=\"dni-treeview\"><summary><span class=\"dni-code-hint\"><code>Milvus.Client.CollectionSchema</code></span></summary><div><table><thead><tr></tr></thead><tbody><tr><td>Name</td><td><div class=\"dni-plaintext\"><pre>book</pre></div></td></tr><tr><td>Description</td><td><div class=\"dni-plaintext\"><pre></pre></div></td></tr><tr><td>Fields</td><td><table><thead><tr><th><i>index</i></th><th>value</th></tr></thead><tbody><tr><td>0</td><td><details class=\"dni-treeview\"><summary><span class=\"dni-code-hint\"><code>Milvus.Client.FieldSchema</code></span></summary><div><table><thead><tr></tr></thead><tbody><tr><td>Name</td><td><div class=\"dni-plaintext\"><pre>book_id</pre></div></td></tr><tr><td>DataType</td><td><span>Int64</span></td></tr><tr><td>IsPrimaryKey</td><td><div class=\"dni-plaintext\"><pre>True</pre></div></td></tr><tr><td>AutoId</td><td><div class=\"dni-plaintext\"><pre>False</pre></div></td></tr><tr><td>IsPartitionKey</td><td><div class=\"dni-plaintext\"><pre>False</pre></div></td></tr><tr><td>Description</td><td><div class=\"dni-plaintext\"><pre></pre></div></td></tr><tr><td>IsDynamic</td><td><div class=\"dni-plaintext\"><pre>False</pre></div></td></tr><tr><td>MaxLength</td><td><div class=\"dni-plaintext\"><pre>&lt;null&gt;</pre></div></td></tr><tr><td>Dimension</td><td><div class=\"dni-plaintext\"><pre>&lt;null&gt;</pre></div></td></tr><tr><td>State</td><td><span>FieldCreated</span></td></tr><tr><td>FieldId</td><td><div class=\"dni-plaintext\"><pre>100</pre></div></td></tr></tbody></table></div></details></td></tr><tr><td>1</td><td><details class=\"dni-treeview\"><summary><span class=\"dni-code-hint\"><code>Milvus.Client.FieldSchema</code></span></summary><div><table><thead><tr></tr></thead><tbody><tr><td>Name</td><td><div class=\"dni-plaintext\"><pre>word_count</pre></div></td></tr><tr><td>DataType</td><td><span>Int64</span></td></tr><tr><td>IsPrimaryKey</td><td><div class=\"dni-plaintext\"><pre>False</pre></div></td></tr><tr><td>AutoId</td><td><div class=\"dni-plaintext\"><pre>False</pre></div></td></tr><tr><td>IsPartitionKey</td><td><div class=\"dni-plaintext\"><pre>False</pre></div></td></tr><tr><td>Description</td><td><div class=\"dni-plaintext\"><pre></pre></div></td></tr><tr><td>IsDynamic</td><td><div class=\"dni-plaintext\"><pre>False</pre></div></td></tr><tr><td>MaxLength</td><td><div class=\"dni-plaintext\"><pre>&lt;null&gt;</pre></div></td></tr><tr><td>Dimension</td><td><div class=\"dni-plaintext\"><pre>&lt;null&gt;</pre></div></td></tr><tr><td>State</td><td><span>FieldCreated</span></td></tr><tr><td>FieldId</td><td><div class=\"dni-plaintext\"><pre>101</pre></div></td></tr></tbody></table></div></details></td></tr><tr><td>2</td><td><details class=\"dni-treeview\"><summary><span class=\"dni-code-hint\"><code>Milvus.Client.FieldSchema</code></span></summary><div><table><thead><tr></tr></thead><tbody><tr><td>Name</td><td><div class=\"dni-plaintext\"><pre>book_name</pre></div></td></tr><tr><td>DataType</td><td><span>VarChar</span></td></tr><tr><td>IsPrimaryKey</td><td><div class=\"dni-plaintext\"><pre>False</pre></div></td></tr><tr><td>AutoId</td><td><div class=\"dni-plaintext\"><pre>False</pre></div></td></tr><tr><td>IsPartitionKey</td><td><div class=\"dni-plaintext\"><pre>False</pre></div></td></tr><tr><td>Description</td><td><div class=\"dni-plaintext\"><pre></pre></div></td></tr><tr><td>IsDynamic</td><td><div class=\"dni-plaintext\"><pre>False</pre></div></td></tr><tr><td>MaxLength</td><td><div class=\"dni-plaintext\"><pre>256</pre></div></td></tr><tr><td>Dimension</td><td><div class=\"dni-plaintext\"><pre>&lt;null&gt;</pre></div></td></tr><tr><td>State</td><td><span>FieldCreated</span></td></tr><tr><td>FieldId</td><td><div class=\"dni-plaintext\"><pre>102</pre></div></td></tr></tbody></table></div></details></td></tr><tr><td>3</td><td><details class=\"dni-treeview\"><summary><span class=\"dni-code-hint\"><code>Milvus.Client.FieldSchema</code></span></summary><div><table><thead><tr></tr></thead><tbody><tr><td>Name</td><td><div class=\"dni-plaintext\"><pre>book_intro</pre></div></td></tr><tr><td>DataType</td><td><span>FloatVector</span></td></tr><tr><td>IsPrimaryKey</td><td><div class=\"dni-plaintext\"><pre>False</pre></div></td></tr><tr><td>AutoId</td><td><div class=\"dni-plaintext\"><pre>False</pre></div></td></tr><tr><td>IsPartitionKey</td><td><div class=\"dni-plaintext\"><pre>False</pre></div></td></tr><tr><td>Description</td><td><div class=\"dni-plaintext\"><pre></pre></div></td></tr><tr><td>IsDynamic</td><td><div class=\"dni-plaintext\"><pre>False</pre></div></td></tr><tr><td>MaxLength</td><td><div class=\"dni-plaintext\"><pre>&lt;null&gt;</pre></div></td></tr><tr><td>Dimension</td><td><div class=\"dni-plaintext\"><pre>2</pre></div></td></tr><tr><td>State</td><td><span>FieldCreated</span></td></tr><tr><td>FieldId</td><td><div class=\"dni-plaintext\"><pre>103</pre></div></td></tr></tbody></table></div></details></td></tr></tbody></table></td></tr><tr><td>EnableDynamicFields</td><td><div class=\"dni-plaintext\"><pre>False</pre></div></td></tr></tbody></table></div></details></td></tr><tr><td>ShardsNum</td><td><div class=\"dni-plaintext\"><pre>1</pre></div></td></tr><tr><td>StartPositions</td><td><i>(empty)</i></td></tr></tbody></table></div></details><style>\r\n",
       ".dni-code-hint {\r\n",
       "    font-style: italic;\r\n",
       "    overflow: hidden;\r\n",
       "    white-space: nowrap;\r\n",
       "}\r\n",
       ".dni-treeview {\r\n",
       "    white-space: nowrap;\r\n",
       "}\r\n",
       ".dni-treeview td {\r\n",
       "    vertical-align: top;\r\n",
       "    text-align: start;\r\n",
       "}\r\n",
       "details.dni-treeview {\r\n",
       "    padding-left: 1em;\r\n",
       "}\r\n",
       "table td {\r\n",
       "    text-align: start;\r\n",
       "}\r\n",
       "table tr { \r\n",
       "    vertical-align: top; \r\n",
       "    margin: 0em 0px;\r\n",
       "}\r\n",
       "table tr td pre \r\n",
       "{ \r\n",
       "    vertical-align: top !important; \r\n",
       "    margin: 0em 0px !important;\r\n",
       "} \r\n",
       "table th {\r\n",
       "    text-align: start;\r\n",
       "}\r\n",
       "</style>"
      ]
     },
     "metadata": {},
     "output_type": "display_data"
    }
   ],
   "source": [
    "string collectionName = \"book\";\n",
    "MilvusCollection collection = milvusClient.GetCollection(collectionName);\n",
    "\n",
    "if(!(await milvusClient.HasCollectionAsync(collectionName)))\n",
    "{\n",
    "    Console.WriteLine($\"Collection {collectionName} not exist\");\n",
    "    return;\n",
    "}\n",
    "\n",
    "await collection.LoadAsync();\n",
    "\n",
    "//Waiting for collection loaded\n",
    "await collection.WaitForCollectionLoadAsync(timeout: TimeSpan.FromSeconds(10));\n",
    "\n",
    "MilvusCollectionDescription collectionInfo = await collection.DescribeAsync();\n",
    "collectionInfo"
   ]
  },
  {
   "attachments": {},
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "# Prepare search parameters\n",
    "\n",
    "| Parameter | Description | Options |\n",
    "| --- | --- | --- |\n",
    "| TopK | Number of the most similar results to return. | N/A |\n",
    "| Params | Search parameter(s) specific to the index. | See [Vector Index](https://milvus.io/docs/v2.3.0-beta/index.md) for more information."
   ]
  },
  {
   "attachments": {},
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "# Conduct a vector search\n",
    "\n",
    "🔍🔍🔍🔍🔍🔍🔍🔍🔍🔍🔍🔍🔍🔍🔍🔍"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 4,
   "metadata": {
    "dotnet_interactive": {
     "language": "csharp"
    },
    "polyglot_notebook": {
     "kernelName": "csharp"
    },
    "vscode": {
     "languageId": "polyglot-notebook"
    }
   },
   "outputs": [
    {
     "data": {
      "text/html": [
       "<details open=\"open\" class=\"dni-treeview\"><summary><span class=\"dni-code-hint\"><code>Milvus.Client.SearchResults</code></span></summary><div><table><thead><tr></tr></thead><tbody><tr><td>CollectionName</td><td><div class=\"dni-plaintext\"><pre>book</pre></div></td></tr><tr><td>FieldsData</td><td><i>(empty)</i></td></tr><tr><td>Ids</td><td><details class=\"dni-treeview\"><summary><span class=\"dni-code-hint\"><code>Milvus.Client.MilvusIds</code></span></summary><div><table><thead><tr></tr></thead><tbody><tr><td>LongIds</td><td><div class=\"dni-plaintext\"><pre>[ 1071, 992 ]</pre></div></td></tr><tr><td>StringIds</td><td><div class=\"dni-plaintext\"><pre>&lt;null&gt;</pre></div></td></tr></tbody></table></div></details></td></tr><tr><td>NumQueries</td><td><div class=\"dni-plaintext\"><pre>1</pre></div></td></tr><tr><td>Scores</td><td><div class=\"dni-plaintext\"><pre>[ 7.926973E+14, 4.595118E+15 ]</pre></div></td></tr><tr><td>Limit</td><td><div class=\"dni-plaintext\"><pre>2</pre></div></td></tr><tr><td>Limits</td><td><div class=\"dni-plaintext\"><pre>[ 2 ]</pre></div></td></tr></tbody></table></div></details><style>\r\n",
       ".dni-code-hint {\r\n",
       "    font-style: italic;\r\n",
       "    overflow: hidden;\r\n",
       "    white-space: nowrap;\r\n",
       "}\r\n",
       ".dni-treeview {\r\n",
       "    white-space: nowrap;\r\n",
       "}\r\n",
       ".dni-treeview td {\r\n",
       "    vertical-align: top;\r\n",
       "    text-align: start;\r\n",
       "}\r\n",
       "details.dni-treeview {\r\n",
       "    padding-left: 1em;\r\n",
       "}\r\n",
       "table td {\r\n",
       "    text-align: start;\r\n",
       "}\r\n",
       "table tr { \r\n",
       "    vertical-align: top; \r\n",
       "    margin: 0em 0px;\r\n",
       "}\r\n",
       "table tr td pre \r\n",
       "{ \r\n",
       "    vertical-align: top !important; \r\n",
       "    margin: 0em 0px !important;\r\n",
       "} \r\n",
       "table th {\r\n",
       "    text-align: start;\r\n",
       "}\r\n",
       "</style>"
      ]
     },
     "metadata": {},
     "output_type": "display_data"
    }
   ],
   "source": [
    "List<string> search_output_fields = new() { \"book_id\" };\n",
    "List<List<float>> search_vectors = new() { new() { 0.1f, 0.2f } };\n",
    "SearchResults searchResult = await collection.SearchAsync(\n",
    "    \"book_intro\",\n",
    "    new ReadOnlyMemory<float>[] { new[] { 0.1f, 0.2f } },\n",
    "    SimilarityMetricType.L2,\n",
    "    limit: 2);\n",
    "\n",
    "searchResult"
   ]
  },
  {
   "attachments": {},
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "| Parameter         | Description                                                  | Options                                                      |\n",
    "| ----------------- | ------------------------------------------------------------ | ------------------------------------------------------------ |\n",
    "| CollectionName    | Name of the collection to load.                              | N/A                                                          |\n",
    "| MetricType        | Metric type used for search.                                 | This parameter must be set identical to the metric type used for index building. |\n",
    "| OutFields         | Name of the field to return.                                 | Vector field is not supported in current release.            |\n",
    "| Vectors           | Vectors to search with.                                      | N/A                                                          |\n",
    "| VectorFieldName   | Name of the field to search on.                               | N/A                                                          |\n",
    "| Expr              | Boolean expression used to filter attribute.                  | See Boolean Expression Rules for more information.           |\n",
    "| ConsistencyLevel  | The consistency level used in the query.                      | STRONG, BOUNDED, and EVENTUALLY.                             |"
   ]
  },
  {
   "attachments": {},
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "# Release the Collection.\n",
    "\n",
    "🍃🍃🍃🍃🍃🍃🍃🍃🍃🍃🍃🍃🍃🍃🍃🍃\n",
    "\n",
    "> Release the collection loaded in Milvus to reduce memory consumption when the search is completed."
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 5,
   "metadata": {
    "dotnet_interactive": {
     "language": "csharp"
    },
    "polyglot_notebook": {
     "kernelName": "csharp"
    },
    "vscode": {
     "languageId": "polyglot-notebook"
    }
   },
   "outputs": [
    {
     "data": {
      "text/html": [
       "<details open=\"open\" class=\"dni-treeview\"><summary><span class=\"dni-code-hint\"><code>Milvus.Client.MilvusCollectionDescription</code></span></summary><div><table><thead><tr></tr></thead><tbody><tr><td>Aliases</td><td><div class=\"dni-plaintext\"><pre>[  ]</pre></div></td></tr><tr><td>CollectionName</td><td><div class=\"dni-plaintext\"><pre>book</pre></div></td></tr><tr><td>CollectionId</td><td><div class=\"dni-plaintext\"><pre>443732094175944322</pre></div></td></tr><tr><td>ConsistencyLevel</td><td><span>Session</span></td></tr><tr><td>CreationTimestamp</td><td><div class=\"dni-plaintext\"><pre>1692705169260</pre></div></td></tr><tr><td>Schema</td><td><details class=\"dni-treeview\"><summary><span class=\"dni-code-hint\"><code>Milvus.Client.CollectionSchema</code></span></summary><div><table><thead><tr></tr></thead><tbody><tr><td>Name</td><td><div class=\"dni-plaintext\"><pre>book</pre></div></td></tr><tr><td>Description</td><td><div class=\"dni-plaintext\"><pre></pre></div></td></tr><tr><td>Fields</td><td><table><thead><tr><th><i>index</i></th><th>value</th></tr></thead><tbody><tr><td>0</td><td><details class=\"dni-treeview\"><summary><span class=\"dni-code-hint\"><code>Milvus.Client.FieldSchema</code></span></summary><div><table><thead><tr></tr></thead><tbody><tr><td>Name</td><td><div class=\"dni-plaintext\"><pre>book_id</pre></div></td></tr><tr><td>DataType</td><td><span>Int64</span></td></tr><tr><td>IsPrimaryKey</td><td><div class=\"dni-plaintext\"><pre>True</pre></div></td></tr><tr><td>AutoId</td><td><div class=\"dni-plaintext\"><pre>False</pre></div></td></tr><tr><td>IsPartitionKey</td><td><div class=\"dni-plaintext\"><pre>False</pre></div></td></tr><tr><td>Description</td><td><div class=\"dni-plaintext\"><pre></pre></div></td></tr><tr><td>IsDynamic</td><td><div class=\"dni-plaintext\"><pre>False</pre></div></td></tr><tr><td>MaxLength</td><td><div class=\"dni-plaintext\"><pre>&lt;null&gt;</pre></div></td></tr><tr><td>Dimension</td><td><div class=\"dni-plaintext\"><pre>&lt;null&gt;</pre></div></td></tr><tr><td>State</td><td><span>FieldCreated</span></td></tr><tr><td>FieldId</td><td><div class=\"dni-plaintext\"><pre>100</pre></div></td></tr></tbody></table></div></details></td></tr><tr><td>1</td><td><details class=\"dni-treeview\"><summary><span class=\"dni-code-hint\"><code>Milvus.Client.FieldSchema</code></span></summary><div><table><thead><tr></tr></thead><tbody><tr><td>Name</td><td><div class=\"dni-plaintext\"><pre>word_count</pre></div></td></tr><tr><td>DataType</td><td><span>Int64</span></td></tr><tr><td>IsPrimaryKey</td><td><div class=\"dni-plaintext\"><pre>False</pre></div></td></tr><tr><td>AutoId</td><td><div class=\"dni-plaintext\"><pre>False</pre></div></td></tr><tr><td>IsPartitionKey</td><td><div class=\"dni-plaintext\"><pre>False</pre></div></td></tr><tr><td>Description</td><td><div class=\"dni-plaintext\"><pre></pre></div></td></tr><tr><td>IsDynamic</td><td><div class=\"dni-plaintext\"><pre>False</pre></div></td></tr><tr><td>MaxLength</td><td><div class=\"dni-plaintext\"><pre>&lt;null&gt;</pre></div></td></tr><tr><td>Dimension</td><td><div class=\"dni-plaintext\"><pre>&lt;null&gt;</pre></div></td></tr><tr><td>State</td><td><span>FieldCreated</span></td></tr><tr><td>FieldId</td><td><div class=\"dni-plaintext\"><pre>101</pre></div></td></tr></tbody></table></div></details></td></tr><tr><td>2</td><td><details class=\"dni-treeview\"><summary><span class=\"dni-code-hint\"><code>Milvus.Client.FieldSchema</code></span></summary><div><table><thead><tr></tr></thead><tbody><tr><td>Name</td><td><div class=\"dni-plaintext\"><pre>book_name</pre></div></td></tr><tr><td>DataType</td><td><span>VarChar</span></td></tr><tr><td>IsPrimaryKey</td><td><div class=\"dni-plaintext\"><pre>False</pre></div></td></tr><tr><td>AutoId</td><td><div class=\"dni-plaintext\"><pre>False</pre></div></td></tr><tr><td>IsPartitionKey</td><td><div class=\"dni-plaintext\"><pre>False</pre></div></td></tr><tr><td>Description</td><td><div class=\"dni-plaintext\"><pre></pre></div></td></tr><tr><td>IsDynamic</td><td><div class=\"dni-plaintext\"><pre>False</pre></div></td></tr><tr><td>MaxLength</td><td><div class=\"dni-plaintext\"><pre>256</pre></div></td></tr><tr><td>Dimension</td><td><div class=\"dni-plaintext\"><pre>&lt;null&gt;</pre></div></td></tr><tr><td>State</td><td><span>FieldCreated</span></td></tr><tr><td>FieldId</td><td><div class=\"dni-plaintext\"><pre>102</pre></div></td></tr></tbody></table></div></details></td></tr><tr><td>3</td><td><details class=\"dni-treeview\"><summary><span class=\"dni-code-hint\"><code>Milvus.Client.FieldSchema</code></span></summary><div><table><thead><tr></tr></thead><tbody><tr><td>Name</td><td><div class=\"dni-plaintext\"><pre>book_intro</pre></div></td></tr><tr><td>DataType</td><td><span>FloatVector</span></td></tr><tr><td>IsPrimaryKey</td><td><div class=\"dni-plaintext\"><pre>False</pre></div></td></tr><tr><td>AutoId</td><td><div class=\"dni-plaintext\"><pre>False</pre></div></td></tr><tr><td>IsPartitionKey</td><td><div class=\"dni-plaintext\"><pre>False</pre></div></td></tr><tr><td>Description</td><td><div class=\"dni-plaintext\"><pre></pre></div></td></tr><tr><td>IsDynamic</td><td><div class=\"dni-plaintext\"><pre>False</pre></div></td></tr><tr><td>MaxLength</td><td><div class=\"dni-plaintext\"><pre>&lt;null&gt;</pre></div></td></tr><tr><td>Dimension</td><td><div class=\"dni-plaintext\"><pre>2</pre></div></td></tr><tr><td>State</td><td><span>FieldCreated</span></td></tr><tr><td>FieldId</td><td><div class=\"dni-plaintext\"><pre>103</pre></div></td></tr></tbody></table></div></details></td></tr></tbody></table></td></tr><tr><td>EnableDynamicFields</td><td><div class=\"dni-plaintext\"><pre>False</pre></div></td></tr></tbody></table></div></details></td></tr><tr><td>ShardsNum</td><td><div class=\"dni-plaintext\"><pre>1</pre></div></td></tr><tr><td>StartPositions</td><td><i>(empty)</i></td></tr></tbody></table></div></details><style>\r\n",
       ".dni-code-hint {\r\n",
       "    font-style: italic;\r\n",
       "    overflow: hidden;\r\n",
       "    white-space: nowrap;\r\n",
       "}\r\n",
       ".dni-treeview {\r\n",
       "    white-space: nowrap;\r\n",
       "}\r\n",
       ".dni-treeview td {\r\n",
       "    vertical-align: top;\r\n",
       "    text-align: start;\r\n",
       "}\r\n",
       "details.dni-treeview {\r\n",
       "    padding-left: 1em;\r\n",
       "}\r\n",
       "table td {\r\n",
       "    text-align: start;\r\n",
       "}\r\n",
       "table tr { \r\n",
       "    vertical-align: top; \r\n",
       "    margin: 0em 0px;\r\n",
       "}\r\n",
       "table tr td pre \r\n",
       "{ \r\n",
       "    vertical-align: top !important; \r\n",
       "    margin: 0em 0px !important;\r\n",
       "} \r\n",
       "table th {\r\n",
       "    text-align: start;\r\n",
       "}\r\n",
       "</style>"
      ]
     },
     "metadata": {},
     "output_type": "display_data"
    }
   ],
   "source": [
    "await collection.ReleaseAsync();\n",
    "\n",
    "MilvusCollectionDescription collectionInfo = await collection.DescribeAsync();\n",
    "collectionInfo"
   ]
  }
 ],
 "metadata": {
  "language_info": {
   "name": "python"
  },
  "orig_nbformat": 4
 },
 "nbformat": 4,
 "nbformat_minor": 2
}
